<script>
  /*
足球运动员

声明一个类FootballPlayer（足球运动员）
有4个属性(私有)
- name 名字
- age 年龄
- height 身高
- weight 体重

有3个getter
- age 返回字符串：```name```现年```age```岁。
- height 返回字符串：```name```身高```height```厘米。
- weight 返回字符串：```name```体重```weight```公斤。

调用例子
```js
 p1 = new FootballPlayer("莱奥·梅西", 34, 170, 72)

 p1.age ➞ "莱奥·梅西现年34岁。"
 p1.height ➞ "莱奥·梅西身高170厘米。"
 p1.weight ➞ "莱奥·梅西体重72公斤。"
```
*/

  class FootballPlayer {
    // ？？你的代码
    #name
    #age
    #height
    #weight
    constructor(name, age, h, w) {
      this.name = name
      this.age = age
      this.height = h
      this.weight = w
    }
    get name() {
      return this.#name
    }
    set name(v) {
      if (typeof v === 'string') {
        this.#name = v
      }
    }
    get age() {
      return `${this.#name}现年${this.#age}岁`
    }
    set age(v) {
      if (typeof v === 'number') {
        this.#age = v
      }
    }
    get height() {
      return `${this.#name}身高${this.#height}厘米`
    }
    set height(v) {
      if (typeof v === 'number') {
        this.#height = v

      }
    }
    get weight() {
      return `${this.#name}体重${this.#weight}公斤`
    }
    set weight(v) {
      if (typeof v === 'number') {
        this.#weight = v

      }
    }

  }

  let p1 = new FootballPlayer('莱奥·梅西', 34, 170, 72)

  console.log(p1)
  console.log(p1.age)
  console.log(p1.height);
  console.log(p1.weight);
  // console.log(p1.getAge())
  // console.log(p1.getHeight())
  // console.log(p1.getWeight())
</script>